import org.junit.Test;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

import static java.nio.charset.StandardCharsets.UTF_8;

/**
 * @Author talent_dog
 * @Date 2024/1/16 12:08
 * @Version 1.0
 */
public class HomeWork02 {
    @Test
    public void work01() throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("C:\\Users\\23652\\Desktop\\bs\\test\\mytemp\\123.txt", UTF_8));
        int i = 0;
        while (br.ready()){
            System.out.println(++i +" : "+ br.readLine());
        }
        br.close();
    }
}
